import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/me",
  },
  {
    path: "/me",
    name: "me",
    component: () => import("../views/me"),
    meta: {
      title: "我的",
    },
  },
  {
    path: "/account-banlance",
    name: "account-banlance",
    component: () => import("../views/me/src/account-balance.vue"),
    meta: {
      title: "账户余额",
    },
  },
  {
    path: "/inpourbalance",
    name: "inpourbalance",
    component: () => import("../views/me/pay/inpourbalance.vue"),
    meta: {
      title: "账户充值",
    },
  },
  {
    path: "/inpourhistory",
    name: "inpourhistory",
    component: () => import("../views/me/src/inpourhistory.vue"),
    meta: {
      title: "付款记录",
    },
  },
  {
    path: "/chargingorderlist",
    name: "chargingorderlist",
    component: () => import("../views/me/src/chargingorderlist.vue"),
    meta: {
      title: "充电记录",
    },
  },
  {
    path: "/inpourcard",
    name: "inpourcard",
    component: () => import("../views/me/pay/inpourcard.vue"),
    meta: {
      title: "充电卡充值",
    },
  },
  {
    path: "/fav",
    name: "fav",
    component: () => import("../views/me/src/fav.vue"),
    meta: {
      title: "常用充电站",
    },
  },
  {
    path: "/aboutus",
    name: "aboutus",
    component: () => import("../views/me/src/aboutus.vue"),
    meta: {
      title: "关于我们",
    },
  },
  {
    path: "/refundRecord",
    name: "refundRecord",
    component: () => import("../views/me/src/refundRecord.vue"),
    meta: {
      title: "申请退款",
    },
  },
  {
    path: "/feedback",
    name: "feedback",
    component: () => import("../views/me/src/feedback.vue"),
    meta: {
      title: "意见反馈",
    },
  },

  {
    path: "/scanqrcode",
    name: "scanqrcode",
    component: () => import("../views/qrcode"),
    meta: {
      title: "扫码充电",
    },
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
